#include "ModelEditorConfig.h"
#include "Model\MD2.h"

Colour CModelEditorConfig::m_EditorBKColor;
Colour CModelEditorConfig::m_DefaultColor[24];
CModelEditorConfig::UILayout CModelEditorConfig::m_UILayout;
CModelEditorConfig::UIResDirFileFilter CModelEditorConfig::m_ResDirFileFilter;


bool	CModelEditorConfig::m_bLoopPlayMode		= false;
int		CModelEditorConfig::m_CurrentFrameID	= 0;
UINT	CModelEditorConfig::m_CurrentAnimID		= 0xFFFFFFFF;
float	CModelEditorConfig::m_CurrentAnimTime	= 0.0f;


LPOYRENDERER			g_pRenderer				= NULL;
LPOYRENDERDEVICE		g_pDevice				= NULL;
OyTimer*				g_pTimer				= NULL;
float					g_Aspect				= 1280.0f/1024.0f;
OY_UCOLOR_VERTEX_TYPE*	g_GuidVertex			= NULL;
OY_UCOLOR_VERTEX_TYPE*	g_AxisVertex			= NULL;


UINT					g_DefaultSkin			= 0xFFFFFFFF;

CModel*					g_pCurrentModelFile		= NULL;


//==============================================================================
void CModelEditorConfig::CloseScene()
{
	m_bFrame0Render.set(1);
	g_pDevice->GetVertexCacheManager()->DeferedClearAllStaticBuffer();
	
	if( g_pCurrentModelFile )
	{
		delete g_pCurrentModelFile;
		g_pCurrentModelFile = NULL;
	}
}